/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * Login.java
 *
 * Created on 22/05/2010, 06:04:08 PM
 */

package Interfaces;

/**
 *
 * @author Karla Ruiz
 */
public class Login extends javax.swing.JFrame {

    /** Creates new form Login */
    public Login() {
        initComponents();
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jLayeredPane1 = new javax.swing.JLayeredPane();
        titulo = new javax.swing.JLabel();
        atras = new javax.swing.JButton();
        salir = new javax.swing.JButton();
        registrarse = new javax.swing.JButton();
        iniciarsesion = new javax.swing.JButton();
        lemail = new javax.swing.JLabel();
        lpassword = new javax.swing.JLabel();
        email = new javax.swing.JTextField();
        password = new javax.swing.JTextField();
        error = new javax.swing.JLabel();
        imagen = new javax.swing.JLabel();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        setTitle("LOGIN");
        setMinimumSize(new java.awt.Dimension(500, 400));
        setResizable(false);

        titulo.setFont(new java.awt.Font("Tahoma", 1, 18));
        titulo.setForeground(new java.awt.Color(255, 255, 255));
        titulo.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        titulo.setText("WorldCupBook");
        titulo.setBounds(140, 20, 210, 40);
        jLayeredPane1.add(titulo, javax.swing.JLayeredPane.DEFAULT_LAYER);

        atras.setText("Atrás");
        atras.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                atrasActionPerformed(evt);
            }
        });
        atras.setBounds(40, 350, 120, -1);
        jLayeredPane1.add(atras, javax.swing.JLayeredPane.DEFAULT_LAYER);

        salir.setText("Salir");
        salir.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                salirActionPerformed(evt);
            }
        });
        salir.setBounds(360, 350, 120, -1);
        jLayeredPane1.add(salir, javax.swing.JLayeredPane.DEFAULT_LAYER);

        registrarse.setText("Registrarse");
        registrarse.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                registrarseActionPerformed(evt);
            }
        });
        registrarse.setBounds(200, 350, 120, -1);
        jLayeredPane1.add(registrarse, javax.swing.JLayeredPane.DEFAULT_LAYER);

        iniciarsesion.setText("Iniciar Sesion");
        iniciarsesion.setBounds(190, 230, 120, -1);
        jLayeredPane1.add(iniciarsesion, javax.swing.JLayeredPane.DEFAULT_LAYER);

        lemail.setForeground(new java.awt.Color(255, 255, 255));
        lemail.setText("Email");
        lemail.setBounds(90, 140, 60, -1);
        jLayeredPane1.add(lemail, javax.swing.JLayeredPane.DEFAULT_LAYER);

        lpassword.setForeground(new java.awt.Color(255, 255, 255));
        lpassword.setText("Password");
        lpassword.setBounds(90, 180, 70, -1);
        jLayeredPane1.add(lpassword, javax.swing.JLayeredPane.DEFAULT_LAYER);
        email.setBounds(190, 140, 130, -1);
        jLayeredPane1.add(email, javax.swing.JLayeredPane.DEFAULT_LAYER);
        password.setBounds(190, 180, 130, -1);
        jLayeredPane1.add(password, javax.swing.JLayeredPane.DEFAULT_LAYER);
        error.setBounds(130, 270, 240, 20);
        jLayeredPane1.add(error, javax.swing.JLayeredPane.DEFAULT_LAYER);

        imagen.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/Sudafrica_2010_2.png"))); // NOI18N
        imagen.setBounds(0, 0, 500, 400);
        jLayeredPane1.add(imagen, javax.swing.JLayeredPane.DEFAULT_LAYER);

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jLayeredPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 500, Short.MAX_VALUE)
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jLayeredPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 400, Short.MAX_VALUE)
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void atrasActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_atrasActionPerformed
        // TODO add your handling code here:
        this.dispose();
    }//GEN-LAST:event_atrasActionPerformed

    private void registrarseActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_registrarseActionPerformed
        // TODO add your handling code here:

        Registro registro = new Registro();
        registro.setVisible(true);

    }//GEN-LAST:event_registrarseActionPerformed

    private void salirActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_salirActionPerformed
        // TODO add your handling code here:
        this.dispose();
    }//GEN-LAST:event_salirActionPerformed

    /**
    * @param args the command line arguments
    */
    public static void main(String args[]) {
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                new Login().setVisible(true);
            }
        });
    }

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton atras;
    private javax.swing.JTextField email;
    private javax.swing.JLabel error;
    private javax.swing.JLabel imagen;
    private javax.swing.JButton iniciarsesion;
    private javax.swing.JLayeredPane jLayeredPane1;
    private javax.swing.JLabel lemail;
    private javax.swing.JLabel lpassword;
    private javax.swing.JTextField password;
    private javax.swing.JButton registrarse;
    private javax.swing.JButton salir;
    private javax.swing.JLabel titulo;
    // End of variables declaration//GEN-END:variables

}
